import { defineStore } from 'pinia';
import { ref, computed } from 'vue'

//侧边导航的收缩功能 
/* export const useSidebarStore = defineStore('sidebar', {
	state: () => {
		return {
			collapse: false
		};
	},
	getters: {},
	actions: {
		handleCollapse() {
			this.collapse = !this.collapse;
		}
	}
}); */

//侧边栏的收缩功能  组合式API
 export const useSidebarStore = defineStore('sidebar', ()=>{
    const  collapse = ref(false)
    function handleCollapse() {
        collapse.value = !collapse.value
	}

    return {collapse,handleCollapse}
 })